const { fork, exec, execFile } = require('child_process');
//var fork = require('child_process').fork;

//启动 1
fork('./child01.js');
console.log(33);

//启动 2
exec('node ./child01.js',(err,stdout,stderr)=>{
    if (err) {
        console.log('err',err)
    } else {
        console.log('stdout exec:',stdout)
    }
});

//启动 3
execFile('node', ['./child01.js'],(err,stdout,stderr)=>{
    if (err) {
        console.log('err',err)
    } else {
        console.log('stdout execFile:',stdout)
    }
})
